

//
//  SecondDetail.m
//  房源、商铺、写字楼详情页
//
//  Created by MB__Lee on 2018/5/22.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "SecondDetail.h"

@interface SecondDetail()
@property (weak, nonatomic) IBOutlet UILabel *rentLabel;

// 根据类型不同显示不同
@property (weak, nonatomic) IBOutlet UILabel *roomTypeLabel;
@property (weak, nonatomic) IBOutlet UILabel *typeLabel;

@property (weak, nonatomic) IBOutlet UILabel *squareLabel;

@end

@implementation SecondDetail

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setModel:(MBFangDetailModel *)model{
    [super setModel:model];
    
    NSUInteger rentNum = [model.rent integerValue];
    NSString *rentStr = [NSString stringWithFormat:@"%zd",rentNum];
    
    if ([model.category isEqualToString:@"1001"]) {
        self.rentLabel.text = [NSString stringWithFormat:@"%@元/月",rentStr];
        self.roomTypeLabel.text = [NSString stringWithFormat:@"%@室%@厅%@卫",model.bedroom,model.livingroom,model.washroom];
        self.typeLabel.text = @"户型";
    }else{
        self.rentLabel.text = [NSString stringWithFormat:@"%@元/㎡.月",rentStr];
        self.roomTypeLabel.text = [NSString stringWithFormat:@"%@",model.type];
        self.roomTypeLabel.text = @"类型";
    }
    
    
    
    
    
    self.squareLabel.text = [NSString stringWithFormat:@"%@㎡",model.square];
    
    
     
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
